home *** CD-ROM | disk | FTP | other *** search
/ The AGA Experience 2 / agavol2.iso / software / utilities / demos / stormc-demo / stormc install-script english < prev    next >
Text File  |  1996-01-22  |  11KB  |  796 lines

  1. ; $VER: StormC V1.0 Install Version 1.04e (21.01.96)
  2.  
  3. ; Installations-Script 
  4.  
  5. ; (c) 1995/96 HAAGE & PARTNER Computer GmbH
  6.  
  7.  
  8.  
  9. (complete 0)
  10.  
  11.  
  12.  
  13. ; Die Versionsnummer und das Erstellungs-Datum der hier installierten
  14.  
  15. ; Versionen.
  16.  
  17.  
  18.  
  19. (set stcpp-version "1.02")
  20.  
  21. (set stcpp-date "(12 Jan 96)")
  22.  
  23.  
  24.  
  25. ;====================================================================
  26.  
  27. ; Initialisierungen
  28.  
  29.  
  30.  
  31.  
  32.  
  33. (set @default-dest "")
  34.  
  35.  
  36.  
  37. (set os-version (/ (getversion) 65536))
  38.  
  39. (set os-13 (< os-version 36))
  40.  
  41. (set os-20 (>= os-version 36))
  42.  
  43. (set os-21 (>= os-version 38))
  44.  
  45.  
  46.  
  47. (set totalmem (database "total-mem")) ; Diese schöne Funktion vereinfacht einiges
  48.  
  49.  
  50.  
  51. ; Die Pfadnamen der Programme, die vom Installations-Skript aufgerufen werden.
  52.  
  53.  
  54.  
  55. ;(set run-lha                "run RAM:Lhex x -a ")
  56.  
  57. ;(set run-free                "run C/StormFree")
  58.  
  59.  
  60.  
  61. ; Die Pfadnamen der einzelnen Quell-Dateien.
  62.  
  63.  
  64.  
  65. (set #binsource             (tackon (pathonly @icon) "StormSYS"))    ; Hier stehen die Ausführbaren Programme
  66.  
  67. (set #includesource         (tackon (pathonly @icon) "INCLUDE"))     ; Hier stehen die Includes
  68.  
  69. (set #envsource            (tackon (pathonly @icon) "ENV"))            ; Die Voreinstellungen
  70.  
  71. (set #libsource            (tackon (pathonly @icon) "LIB"))            ; Hier stehen die Bibliotheken
  72.  
  73. (set #samplesource        (tackon (pathonly @icon) "Examples"))    ; Hier stehen die Demo-Sourcen
  74.  
  75. (set #manualsource        (tackon (pathonly @icon) "MANUAL"))        ; Hier steht die Dokumentation
  76.  
  77. (set source-Liesmich     (tackon (pathonly @icon) "Readme"))        ; Die Liesmich Datei 
  78.  
  79. (set source-ikon        (tackon (pathonly @icon) "StormCPP.info"))    ; Das Programm-Piktogramm
  80.  
  81.  
  82.  
  83.  
  84.  
  85. ;(set !auswahlhilfe
  86.  
  87. ;    (cat "\nAuf Ihrer Festplatte befindet sich bereits eine Version "
  88.  
  89. ;        "der Datei die installiert werden soll. \n\n"
  90.  
  91. ;        "Wählen Sie \"Ja\", wenn Sie die alte Datei mit der neuen "
  92.  
  93. ;        "überschreiben möchten. Anderenfalls waehlen Sie bitte \"Nein\"!\n"))
  94.  
  95.  
  96.  
  97. (set #prp-copy-samples
  98.  
  99.     "Copying C and C++ examples...")
  100.  
  101. (set #hlp-copy-samples
  102.  
  103.     "Use the manual and the examples to get a quick start with StormC")
  104.  
  105. (set #prp-copy-env
  106.  
  107.     "Copying the StormC default icons...")
  108.  
  109. (set #hlp-copy-env
  110.  
  111.     "The icons are used by the project management and by the editor")
  112.  
  113. (set #prp-copy-includes
  114.  
  115.     "Copying the C++ includes...")
  116.  
  117. (set #hlp-copy-includes
  118.  
  119.     "The includes are needed by the preprocessor of the compiler")
  120.  
  121. (set #prp-copy-libs
  122.  
  123.     "Copying the linker libraries...")
  124.  
  125. (set #hlp-copy-libs
  126.  
  127.     "These libraries are used by the linker")
  128.  
  129. (set #prp-copy-manual
  130.  
  131.     "Copying the documentation...")
  132.  
  133. (set #hlp-copy-manual
  134.  
  135.     "This is an Amiga Guide file for StormC")
  136.  
  137. (set #prp-copy-bin
  138.  
  139.     "Copying the executables of StormC...")
  140.  
  141. (set #hlp-copy-bin
  142.  
  143.     "If this is your first time insatallation of StormC, you should copy everything!")
  144.  
  145.     
  146.  
  147. ; Die Dateigroessen
  148.  
  149.  
  150.  
  151. (set size-stormcpp            54000)
  152.  
  153. (set size-stormc                424000)
  154.  
  155. (set size-stormed                312000)
  156.  
  157. (set size-stormshell              416000)
  158.  
  159. (set size-stormrun            381000)
  160.  
  161. (set size-stormasm            36000)
  162.  
  163. (set size-stormpics            50000)
  164.  
  165. (set size-stormlex            50000)
  166.  
  167. (set size-libs                    320000)
  168.  
  169. (set size-inlcudes            950000)
  170.  
  171. (set size-demos                200000)
  172.  
  173.  
  174.  
  175. (set size-komplett    ( + size-stormrun size-stormasm size-stormcpp size-stormc size-stormed size-stormshell size-stormpics size-stormlex size-libs size-inlcudes size-demos))
  176.  
  177.  
  178.  
  179. ; ----------------------------- Prozeduren ------------------------------
  180.  
  181.  
  182.  
  183. (Procedure Make_Folder
  184.  
  185.     (
  186.  
  187.     (set folder (tackon folder "StormC"))
  188.  
  189.     (if (= (exists folder) 0)
  190.  
  191.        (
  192.  
  193.        (makedir folder (infos))
  194.  
  195.        )
  196.  
  197.     ))
  198.  
  199. )
  200.  
  201.  
  202.  
  203. ;=====================================================================================
  204.  
  205. ; Beginn der Installation
  206.  
  207. ;=====================================================================================
  208.  
  209.  
  210.  
  211. ; Eine kleine Einleitung, gefolgt vom Startbild des Installers.
  212.  
  213.  
  214.  
  215. (set act-user-level @user-level)
  216.  
  217. (user 1)
  218.  
  219.  
  220.  
  221. (message (cat    "\nWelcome to the installation of the \n\n\"StormC demo "
  222.  
  223.                      stcpp-version " of the "stcpp-date "\"!\n\n"
  224.  
  225.                     "This script copies the files needed by StormC "
  226.  
  227.                     "to your harddisk.\n"))
  228.  
  229.  
  230.  
  231. (user act-user-level)
  232.  
  233. (welcome)
  234.  
  235.  
  236.  
  237. (complete 5)
  238.  
  239.  
  240.  
  241. (set act-user-level @user-level)
  242.  
  243. (user 1)
  244.  
  245.  
  246.  
  247.  
  248.  
  249. ;    Alte Version pruefen und entsprechende Warnung ausgeben! **************************************************************
  250.  
  251.  
  252.  
  253. (set folder "WORK:StormC")
  254.  
  255.  
  256.  
  257. (if (exists "StormC:" (noreq))
  258.  
  259.     (
  260.  
  261.         (message (cat    "\nThere is already and installation of StormC\n"
  262.  
  263.                         "on your harddisk! Please select the parent\n"
  264.  
  265.                         "directory or the volume if you want to update\n"
  266.  
  267.                         "your old StormC installation!"))
  268.  
  269.  
  270.  
  271.     (set folder (getassign "STORMC"))
  272.  
  273.     )
  274.  
  275. )
  276.  
  277.  
  278.  
  279. (set cmpstr (getassign "STORMC"))
  280.  
  281.  
  282.  
  283. (user act-user-level)
  284.  
  285.  
  286.  
  287. (if (= @user-level 0)
  288.  
  289.     (
  290.  
  291.     (user 1)
  292.  
  293.     (message (cat    "The ENTRY mode needs a minimum of 5 MB of free harddisk space."
  294.  
  295.                         "Please select a drawer/volume for your StormC installation"
  296.  
  297.                         "\n\n"
  298.  
  299.                         "All other settings will be done by the installation "
  300.  
  301.                         "script to fit your system."))))
  302.  
  303.  
  304.  
  305. (set ok 0)
  306.  
  307. (while (not ok)
  308.  
  309.     (set folder
  310.  
  311.         (askdir
  312.  
  313.             (prompt (cat "\n"
  314.  
  315.                              "Select a path for your StormC installation.\n"
  316.  
  317.                              "A drawer named StormC will be created!"))
  318.  
  319.             (help (cat    "    You will get an overview of all volumes with 'Show drives' "
  320.  
  321.                             "Form this list you should select the first, non colored, items. "
  322.  
  323.                             "only\n"
  324.  
  325.                             "    Typical names are \"WORK:\", \"HD0:\" or \"DH0:\"; "
  326.  
  327.                             "do not use such names as \"DF0:\", \"DF1:\", "
  328.  
  329.                             "\"DF2:\", \"DF3:\", \"RAD:\", \"RAM:\", \"System2.0:\", "
  330.  
  331.                             "\"WB_2.x:\", \"System3.0:\" or \"WB_3.x:\"!"
  332.  
  333.                             "\n\n"
  334.  
  335.                             "The Storm C installation can not be placed on a volume directly. "
  336.  
  337.                             "You have to select a drawer. Ohterwise an error will be shown. "
  338.  
  339.                             "\n\n"
  340.  
  341.                             @askdir-help))
  342.  
  343.             (default folder)
  344.  
  345.             (disk)
  346.  
  347.         )
  348.  
  349.     )
  350.  
  351.  
  352.  
  353.    (Make_Folder)    ; // Automatisch neues Verzeichnis anlegen!
  354.  
  355.  
  356.  
  357.     ; Ist der Dateiname leer oder endet mit einem ':' oder existiert unter
  358.  
  359.     ; diesem Namen kein Verzeichnis, wird eine Fehlermeldung angezeigt; andernfalls
  360.  
  361.     ; kann die Auswahl-Schleife beendet werden.
  362.  
  363.     (if (or (or (or (<= (strlen folder) 0) (= (substr folder (- (strlen folder) 1) 1) ":")) (= (exists folder (noreq)) 0)) (= (getdiskspace folder) -1))
  364.  
  365.         (message (cat    "\nYour selection \"" folder "\" is not a valid "
  366.  
  367.                             "drawer !\n\n"
  368.  
  369.                             "Use 'Show drives' to get a list of all volumes. "
  370.  
  371.                             " Form this list you should only select the first, non color, items. "
  372.  
  373.                             "\n"
  374.  
  375.                             "Use \"New drawer...\" to create a new drawer on the current "
  376.  
  377.                                "volume."))
  378.  
  379.         ;else
  380.  
  381.         (
  382.  
  383.             (set freediskspace (getdiskspace folder))    ; Der freie Speicher auf diesem Medium
  384.  
  385.  
  386.  
  387.             (if (< freediskspace size-komplett)
  388.  
  389.                 (
  390.  
  391.                 (user 1)
  392.  
  393.                 (message (cat    "\nThe is not enough free space on the volume you "
  394.  
  395.                                             "selected for the complete installation of StormC. "
  396.  
  397.                                             "\n\n"
  398.  
  399.                                             "Free diskspace " freediskspace "!\n"
  400.  
  401.                                             "diskspace needed " size-komplett "!\n\n"
  402.  
  403.                                             "Please select another volume !"))                
  404.  
  405.                 )
  406.  
  407.             ;else
  408.  
  409.             (set ok 1)
  410.  
  411.             )
  412.  
  413.         )
  414.  
  415.     )
  416.  
  417. )
  418.  
  419.  
  420.  
  421. (makeassign "STORMC")
  422.  
  423.  
  424.  
  425. (user act-user-level)
  426.  
  427.  
  428.  
  429. (set @default-dest folder)    ; Die Zuweisung ist sehr wichtig!
  430.  
  431.  
  432.  
  433. (set destbin    (tackon folder "StormSYS"))
  434.  
  435. (if                                          ; Compiler-Verzeichnis erzeugen
  436.  
  437.     (= (exists destbin) 0)
  438.  
  439.     (makedir destbin (infos))
  440.  
  441. )
  442.  
  443.  
  444.  
  445. (set destdemo    (tackon folder "Examples"))
  446.  
  447. (if                                          ; Demo-Verzeichnis erzeugen
  448.  
  449.     (= (exists destdemo) 0)
  450.  
  451.     (makedir destdemo (infos))
  452.  
  453. )
  454.  
  455. (set destinclude (tackon folder "Include"))
  456.  
  457. (if                                          ; Includes-Verzeichnis erzeugen
  458.  
  459.     (= (exists destinclude) 0)
  460.  
  461.     (makedir destinclude)
  462.  
  463. )
  464.  
  465.  
  466.  
  467. (set destlib    (tackon folder "Lib"))
  468.  
  469. (if                                          ; Libraries-Verzeichnis erzeugen
  470.  
  471.     (= (exists destlib) 0)
  472.  
  473.     (makedir destlib)
  474.  
  475. )
  476.  
  477.  
  478.  
  479. (set destmanual    (tackon folder "Manual"))
  480.  
  481. (if                                          ; Dokumentations-Verzeichnis erzeugen
  482.  
  483.     (= (exists destmanual) 0)
  484.  
  485.     (makedir destmanual (infos))
  486.  
  487. )
  488.  
  489.  
  490.  
  491. (complete 5)
  492.  
  493.  
  494.  
  495. ; Liesmich Datei auf Festplatte kopieren!
  496.  
  497.  
  498.  
  499. (copyfiles
  500.  
  501.     (source source-Liesmich)
  502.  
  503.     (dest folder)
  504.  
  505.     (infos)
  506.  
  507. )
  508.  
  509.  
  510.  
  511. (complete 8)
  512.  
  513.  
  514.  
  515. (set morerunpath "run C/More Readme")
  516.  
  517.  
  518.  
  519. (run morerunpath)    ; Liesmich laden
  520.  
  521.  
  522.  
  523. (complete 10)
  524.  
  525.  
  526.  
  527. (set destinfo    (tackon folder "StormCPP.info"))
  528.  
  529. (if                                          ; Projekt-Ikon erzeugen
  530.     (= (exists destinfo) 0)
  531.     (
  532.     (copyfiles
  533.         (source source-ikon)
  534.         (dest folder)
  535.     ))
  536. )
  537.  
  538.  
  539.  
  540. (complete 15)
  541.  
  542.  
  543.  
  544. (copyfiles                                            ; Beispiele kopieren
  545.  
  546.     (prompt #prp-copy-samples)
  547.  
  548.     (help #hlp-copy-samples)
  549.  
  550.     (source #samplesource)
  551.  
  552.     (dest destdemo)
  553.  
  554.     (all)
  555.  
  556.     (confirm)
  557.  
  558. )
  559.  
  560.  
  561.  
  562. (complete 20)
  563.  
  564.  
  565.  
  566. (copyfiles                                            ; Settings kopieren
  567.  
  568.     (prompt #prp-copy-env)
  569.  
  570.     (help #hlp-copy-env)
  571.  
  572.     (source #envsource)
  573.  
  574.     (dest "ENVARC:")
  575.  
  576.     (all)
  577.  
  578.     (confirm)
  579.  
  580. )
  581.  
  582.  
  583.  
  584. (complete 22)
  585.  
  586.  
  587.  
  588. (copyfiles                                            ; Settings kopieren
  589.  
  590.     (prompt #prp-copy-env)
  591.  
  592.     (help #hlp-copy-env)
  593.  
  594.     (source #envsource)
  595.  
  596.     (dest "ENV:")
  597.  
  598.     (all)
  599.  
  600.     (confirm)
  601.  
  602. )
  603.  
  604.  
  605.  
  606. (complete 25)
  607.  
  608.  
  609.  
  610. (copyfiles                                            ; Compiler kopieren
  611.  
  612.     (prompt #prp-copy-bin)
  613.  
  614.     (help #hlp-copy-bin)
  615.  
  616.     (source #binsource)
  617.  
  618.     (dest destbin)
  619.  
  620.     (all)
  621.  
  622.     (confirm)
  623.  
  624. )
  625.  
  626.  
  627.  
  628. (complete 40)
  629.  
  630.  
  631.  
  632. (copyfiles                                            ; Includes kopieren
  633.  
  634.     (prompt #prp-copy-includes)
  635.  
  636.     (help #hlp-copy-includes)
  637.  
  638.     (source #includesource)
  639.  
  640.     (dest destinclude)
  641.  
  642.     (all)
  643.  
  644.     (confirm)
  645.  
  646. )
  647.  
  648.  
  649.  
  650. (complete 60)
  651.  
  652.  
  653.  
  654. (copyfiles                                            ; Libs kopieren
  655.  
  656.     (prompt #prp-copy-libs)
  657.  
  658.     (help #hlp-copy-libs)
  659.  
  660.     (source #libsource)
  661.  
  662.     (dest destlib)
  663.  
  664.     (all)
  665.  
  666.     (confirm)
  667.  
  668. )
  669.  
  670.  
  671.  
  672. (complete 80)
  673.  
  674.  
  675.  
  676. (copyfiles                                            ; Manual kopieren
  677.  
  678.     (prompt #prp-copy-manual)
  679.  
  680.     (help #hlp-copy-manual)
  681.  
  682.     (source #manualsource)
  683.  
  684.     (dest destmanual)
  685.  
  686.     (all)
  687.  
  688.     (confirm)
  689.  
  690. )
  691.  
  692.  
  693.  
  694. (complete 95)
  695.  
  696.  
  697.  
  698.  
  699.  
  700. ; ------- STARTUP ÄNDERN
  701.  
  702.  
  703.  
  704. (set command1 (cat  "ASSIGN STORMC: " folder ""))
  705.  
  706.  
  707.  
  708. (set command1.txt
  709.  
  710.     (cat 
  711.  
  712.          "\n\n\nThere User-Startup must be changed to get StromC "
  713.  
  714.       "work right.\n\n"
  715.  
  716.          command1
  717.  
  718.     )
  719.  
  720. )
  721.  
  722.  
  723.  
  724. (startup "StormC"
  725.  
  726.     (prompt command1.txt)
  727.  
  728.     (help #help-startup)
  729.  
  730.     (command command1)
  731.  
  732. )
  733.  
  734.  
  735.  
  736. (makeassign "STORMC")
  737.  
  738. (makeassign "STORMC" folder)
  739.  
  740.  
  741.  
  742. ;(set FREERROR (run "C/StormFree"))
  743.  
  744.  
  745.  
  746. ;(if  ( <> FREERROR 0)
  747.  
  748. ;    (
  749.  
  750. ;    (delete "STORMC:BIN/StormCPP")
  751.  
  752. ;    (delete "STORMC:BIN/StormCPP.info")
  753.  
  754. ;    (delete "STORMC:StormCPP.info")
  755.  
  756. ;    (message
  757.  
  758. ;        "\n\n\n\n"
  759.  
  760. ;        "Fehler bei der Installation.\n"
  761.  
  762. ;        "Die Installation war fehlerhaft!\n\n"
  763.  
  764. ;        "Stellen Sie bitte sicher, daß Ihre Festplatte ausreichend Speicherkapazität hat, "
  765.  
  766. ;        " und, falls die Dateien bereits vorhanden sind diese nicht "
  767.  
  768. ;        " Lösch- oder Schreibgeschützt sind.")
  769.  
  770. ;    )
  771.  
  772. ;)
  773.  
  774.  
  775.  
  776. (complete 100)
  777.  
  778.  
  779.  
  780. ; ------- FERTIG
  781.  
  782.  
  783.  
  784. (message (cat 
  785.  
  786.     "\nInstallation of StormC is done.\n"
  787.  
  788.    "When the lines:\n" command1 "\nare not inserted in your Startup-Sequence or "
  789.  
  790.    "User-Startup, please do it by your own.\n\n"
  791.  
  792.    "\n\nBest wishes ... ")
  793.  
  794. )
  795.  
  796.